﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Security.Cryptography;
using System.Globalization;

namespace NWBA_Public
{
    public static class ServerString
    {
        public static String getServerString ()
        {
            //return "Data Source=potoroo.cs.rmit.edu.au;Initial Catalog=s3386122_wdt;User ID=s3386122_wdt;Password=qzmphardy;MultipleActiveResultSets=True;Application Name=EntityFramework";
            return "Data Source=localhost;Initial Catalog=WDT;Integrated Security=True";
        }
        // method that hash the passowrd
        public static string password(this string password)
        {
            byte[] bytes = Encoding.Unicode.GetBytes(password);
            HashAlgorithm hash = HashAlgorithm.Create("MD5");
            byte[] pass = hash.ComputeHash(bytes);
            return Convert.ToBase64String(pass);
        }
    }
}